package com.atguigu.marketing.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import net.minidev.json.JSONObject;

/**
 * <p>
 * 营销规则-受众
 * </p>
 *
 * @author zhangchen
 * @since 2023-02-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="MarketingRuleGroup对象", description="营销规则-受众")
@TableName(value="marketing_rule_group" ,autoResultMap = true)
public class MarketingRuleGroup implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "营销规则id")
    private Long marketingRuleId;

    @ApiModelProperty(value = "分群ids支持多个,json结构")
    @TableField(typeHandler = FastjsonTypeHandler.class,value = "group_ids_json")
    private List<String> groupIds;

    //private String groupIdsJson;

    @TableField(typeHandler = JacksonTypeHandler.class,value = "user_actions_today_json")
    private List<MarketingRuleUserAction> userActionsTodayList=new ArrayList<>();

    //private String userActionsTodayJson;

    @ApiModelProperty(value = "预估人数")
    private Long userNum;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;


}
